package com.tl.boot.entity.role.form;

import com.tl.boot.common.enums.ResultEnum;
import com.tl.boot.common.exception.BaseException;
import com.tl.boot.entity.demo.form.Base.BaseForm;

import java.util.List;

/**
 * com.tl.boot.entity.role.form -- UpdateRoleResourceBindInfoForm
 * Description:
 * Created by joshua_liu <a href="mailto:joshualwork@163.com"></a>
 * On 2019/9/19 22:51
 */
public class UpdateRoleResourceBindInfoForm extends BaseForm {
    private Long roleId;
    private List<Long> addResIds;
    private List<Long> delResIds;

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public List<Long> getAddResIds() {
        return addResIds;
    }

    public void setAddResIds(List<Long> addResIds) {
        this.addResIds = addResIds;
    }

    public List<Long> getDelResIds() {
        return delResIds;
    }

    public void setDelResIds(List<Long> delResIds) {
        this.delResIds = delResIds;
    }

    @Override
    public void checkParam() {
        if (this.roleId == null) {
            throw new BaseException(ResultEnum.REQUEST_PARAM_ILLEGAL);
        }
    }
}
